package Presentation;

import Metier.Controleurs.GestionStock;

import javax.swing.SwingUtilities;

class ThreadRafraichissementStock extends Thread {
    private final OngletStock onglet;
    private final GestionStock gStock;

    public ThreadRafraichissementStock(OngletStock onglet, GestionStock gStock) {
        super();
        this.onglet = onglet;
        this.gStock = gStock;
    }
    
    @Override
    public void run() {
        gStock.rafraichirAlertes();
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                onglet.setRedLabels();
            }
        });
    }
}
